3.13.22 \(\int \cot ^5(c+d x) \csc (c+d x) (a+b \sin (c+d x))^2 \, dx\) [1222]

3.13.22.1 Optimal result
3.13.22.2 Mathematica [A] (verified)
3.13.22.3 Rubi [A] (verified)
3.13.22.4 Maple [A] (verified)
3.13.22.5 Fricas [A] (verification not implemented)
3.13.22.6 Sympy [F(-1)]
3.13.22.7 Maxima [A] (verification not implemented)
3.13.22.8 Giac [A] (verification not implemented)
3.13.22.9 Mupad [B] (verification not implemented)

3.13.22.1 Optimal result

Integrand size = 27, antiderivative size = 124 \[ \int \cot ^5(c+d x) \csc (c+d x) (a+b \sin (c+d x))^2 \, dx=-\frac {\left (a^2-2 b^2\right ) \csc (c+d x)}{d}+\frac {2 a b \csc ^2(c+d x)}{d}+\frac {\left (2 a^2-b^2\right ) \csc ^3(c+d x)}{3 d}-\frac {a b \csc ^4(c+d x)}{2 d}-\frac {a^2 \csc ^5(c+d x)}{5 d}+\frac {2 a b \log (\sin (c+d x))}{d}+\frac {b^2 \sin (c+d x)}{d} \]

output
-(a^2-2*b^2)*csc(d*x+c)/d+2*a*b*csc(d*x+c)^2/d+1/3*(2*a^2-b^2)*csc(d*x+c)^ 
3/d-1/2*a*b*csc(d*x+c)^4/d-1/5*a^2*csc(d*x+c)^5/d+2*a*b*ln(sin(d*x+c))/d+b 
^2*sin(d*x+c)/d
 
3.13.22.2 Mathematica [A] (verified)

Time = 0.13 (sec) , antiderivative size = 105, normalized size of antiderivative = 0.85 \[ \int \cot ^5(c+d x) \csc (c+d x) (a+b \sin (c+d x))^2 \, dx=\frac {-30 \left (a^2-2 b^2\right ) \csc (c+d x)+60 a b \csc ^2(c+d x)+10 \left (2 a^2-b^2\right ) \csc ^3(c+d x)-15 a b \csc ^4(c+d x)-6 a^2 \csc ^5(c+d x)+30 b (2 a \log (\sin (c+d x))+b \sin (c+d x))}{30 d} \]

input
Integrate[Cot[c + d*x]^5*Csc[c + d*x]*(a + b*Sin[c + d*x])^2,x]
 
output
(-30*(a^2 - 2*b^2)*Csc[c + d*x] + 60*a*b*Csc[c + d*x]^2 + 10*(2*a^2 - b^2) 
*Csc[c + d*x]^3 - 15*a*b*Csc[c + d*x]^4 - 6*a^2*Csc[c + d*x]^5 + 30*b*(2*a 
*Log[Sin[c + d*x]] + b*Sin[c + d*x]))/(30*d)
 
3.13.22.3 Rubi [A] (verified)

Time = 0.32 (sec) , antiderivative size = 114, normalized size of antiderivative = 0.92, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.185, Rules used = {3042, 3316, 27, 522, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \cot ^5(c+d x) \csc (c+d x) (a+b \sin (c+d x))^2 \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {\cos (c+d x)^5 (a+b \sin (c+d x))^2}{\sin (c+d x)^6}dx\)

\(\Big \downarrow \) 3316

\(\displaystyle \frac {\int \csc ^6(c+d x) (a+b \sin (c+d x))^2 \left (b^2-b^2 \sin ^2(c+d x)\right )^2d(b \sin (c+d x))}{b^5 d}\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {b \int \frac {\csc ^6(c+d x) (a+b \sin (c+d x))^2 \left (b^2-b^2 \sin ^2(c+d x)\right )^2}{b^6}d(b \sin (c+d x))}{d}\)

\(\Big \downarrow \) 522

\(\displaystyle \frac {b \int \left (\frac {a^2 \csc ^6(c+d x)}{b^2}+\frac {2 a \csc ^5(c+d x)}{b}+\frac {\left (b^4-2 a^2 b^2\right ) \csc ^4(c+d x)}{b^4}-\frac {4 a \csc ^3(c+d x)}{b}+\frac {\left (a^2-2 b^2\right ) \csc ^2(c+d x)}{b^2}+\frac {2 a \csc (c+d x)}{b}+1\right )d(b \sin (c+d x))}{d}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {b \left (\frac {\left (2 a^2-b^2\right ) \csc ^3(c+d x)}{3 b}-\frac {\left (a^2-2 b^2\right ) \csc (c+d x)}{b}-\frac {a^2 \csc ^5(c+d x)}{5 b}+2 a \log (b \sin (c+d x))-\frac {1}{2} a \csc ^4(c+d x)+2 a \csc ^2(c+d x)+b \sin (c+d x)\right )}{d}\)

input
Int[Cot[c + d*x]^5*Csc[c + d*x]*(a + b*Sin[c + d*x])^2,x]
 
output
(b*(-(((a^2 - 2*b^2)*Csc[c + d*x])/b) + 2*a*Csc[c + d*x]^2 + ((2*a^2 - b^2 
)*Csc[c + d*x]^3)/(3*b) - (a*Csc[c + d*x]^4)/2 - (a^2*Csc[c + d*x]^5)/(5*b 
) + 2*a*Log[b*Sin[c + d*x]] + b*Sin[c + d*x]))/d
 

3.13.22.3.1 Defintions of rubi rules used

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

rule 522
Int[((e_.)*(x_))^(m_.)*((c_) + (d_.)*(x_))^(n_.)*((a_) + (b_.)*(x_)^2)^(p_. 
), x_Symbol] :> Int[ExpandIntegrand[(e*x)^m*(c + d*x)^n*(a + b*x^2)^p, x], 
x] /; FreeQ[{a, b, c, d, e, m, n}, x] && IGtQ[p, 0]
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3316
Int[cos[(e_.) + (f_.)*(x_)]^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_ 
.)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Simp[1/(b^p* 
f)   Subst[Int[(a + x)^m*(c + (d/b)*x)^n*(b^2 - x^2)^((p - 1)/2), x], x, b* 
Sin[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f, m, n}, x] && IntegerQ[(p - 1) 
/2] && NeQ[a^2 - b^2, 0]
 
3.13.22.4 Maple [A] (verified)

Time = 0.47 (sec) , antiderivative size = 115, normalized size of antiderivative = 0.93

method result size
derivativedivides \(-\frac {\frac {\left (\csc ^{5}\left (d x +c \right )\right ) a^{2}}{5}+\frac {a b \left (\csc ^{4}\left (d x +c \right )\right )}{2}-\frac {2 a^{2} \left (\csc ^{3}\left (d x +c \right )\right )}{3}+\frac {b^{2} \left (\csc ^{3}\left (d x +c \right )\right )}{3}-2 a b \left (\csc ^{2}\left (d x +c \right )\right )+\csc \left (d x +c \right ) a^{2}-2 \csc \left (d x +c \right ) b^{2}-\frac {b^{2}}{\csc \left (d x +c \right )}+2 a b \ln \left (\csc \left (d x +c \right )\right )}{d}\) \(115\)
default \(-\frac {\frac {\left (\csc ^{5}\left (d x +c \right )\right ) a^{2}}{5}+\frac {a b \left (\csc ^{4}\left (d x +c \right )\right )}{2}-\frac {2 a^{2} \left (\csc ^{3}\left (d x +c \right )\right )}{3}+\frac {b^{2} \left (\csc ^{3}\left (d x +c \right )\right )}{3}-2 a b \left (\csc ^{2}\left (d x +c \right )\right )+\csc \left (d x +c \right ) a^{2}-2 \csc \left (d x +c \right ) b^{2}-\frac {b^{2}}{\csc \left (d x +c \right )}+2 a b \ln \left (\csc \left (d x +c \right )\right )}{d}\) \(115\)
parallelrisch \(\frac {-384 \ln \left (\sec ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a b +384 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a b +\left (a^{2} \left (\sec ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \left (\cos \left (2 d x +2 c \right )-\frac {3 \cos \left (4 d x +4 c \right )}{4}-\frac {29}{20}\right ) \left (\csc ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-\frac {39 b \left (\cos \left (2 d x +2 c \right )+\frac {19 \cos \left (4 d x +4 c \right )}{52}-\frac {7}{52}\right ) \sec \left (\frac {d x}{2}+\frac {c}{2}\right ) a \csc \left (\frac {d x}{2}+\frac {c}{2}\right )}{8}-36 b^{2} \left (\cos \left (2 d x +2 c \right )-\frac {\cos \left (4 d x +4 c \right )}{12}-\frac {25}{36}\right )\right ) \left (\csc ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \left (\sec ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{192 d}\) \(180\)
risch \(-2 i x a b -\frac {i b^{2} {\mathrm e}^{i \left (d x +c \right )}}{2 d}+\frac {i {\mathrm e}^{-i \left (d x +c \right )} b^{2}}{2 d}-\frac {4 i a b c}{d}-\frac {2 i \left (15 a^{2} {\mathrm e}^{9 i \left (d x +c \right )}-30 b^{2} {\mathrm e}^{9 i \left (d x +c \right )}-20 a^{2} {\mathrm e}^{7 i \left (d x +c \right )}+100 b^{2} {\mathrm e}^{7 i \left (d x +c \right )}-60 i a b \,{\mathrm e}^{8 i \left (d x +c \right )}+58 a^{2} {\mathrm e}^{5 i \left (d x +c \right )}-140 b^{2} {\mathrm e}^{5 i \left (d x +c \right )}+120 i a b \,{\mathrm e}^{6 i \left (d x +c \right )}-20 a^{2} {\mathrm e}^{3 i \left (d x +c \right )}+100 b^{2} {\mathrm e}^{3 i \left (d x +c \right )}-120 i a b \,{\mathrm e}^{4 i \left (d x +c \right )}+15 a^{2} {\mathrm e}^{i \left (d x +c \right )}-30 b^{2} {\mathrm e}^{i \left (d x +c \right )}+60 i a b \,{\mathrm e}^{2 i \left (d x +c \right )}\right )}{15 d \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{5}}+\frac {2 a b \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )}{d}\) \(288\)
norman \(\frac {-\frac {a^{2}}{160 d}-\frac {a^{2} \left (\tan ^{14}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{160 d}-\frac {5 \left (17 a^{2}-88 b^{2}\right ) \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{96 d}-\frac {5 \left (17 a^{2}-88 b^{2}\right ) \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{96 d}+\frac {\left (19 a^{2}-20 b^{2}\right ) \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{480 d}+\frac {\left (19 a^{2}-20 b^{2}\right ) \left (\tan ^{12}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{480 d}-\frac {\left (103 a^{2}-380 b^{2}\right ) \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{480 d}-\frac {\left (103 a^{2}-380 b^{2}\right ) \left (\tan ^{10}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{480 d}-\frac {11 a b \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{16 d}-\frac {a b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{32 d}+\frac {5 a b \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{16 d}+\frac {5 a b \left (\tan ^{11}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{16 d}-\frac {a b \left (\tan ^{13}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{32 d}}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5} \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{2}}+\frac {2 a b \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {2 a b \ln \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}\) \(345\)

input
int(cos(d*x+c)^5*csc(d*x+c)^6*(a+b*sin(d*x+c))^2,x,method=_RETURNVERBOSE)
 
output
-1/d*(1/5*csc(d*x+c)^5*a^2+1/2*a*b*csc(d*x+c)^4-2/3*a^2*csc(d*x+c)^3+1/3*b 
^2*csc(d*x+c)^3-2*a*b*csc(d*x+c)^2+csc(d*x+c)*a^2-2*csc(d*x+c)*b^2-b^2/csc 
(d*x+c)+2*a*b*ln(csc(d*x+c)))
 
3.13.22.5 Fricas [A] (verification not implemented)

Time = 0.40 (sec) , antiderivative size = 166, normalized size of antiderivative = 1.34 \[ \int \cot ^5(c+d x) \csc (c+d x) (a+b \sin (c+d x))^2 \, dx=-\frac {30 \, b^{2} \cos \left (d x + c\right )^{6} + 30 \, {\left (a^{2} - 5 \, b^{2}\right )} \cos \left (d x + c\right )^{4} - 40 \, {\left (a^{2} - 5 \, b^{2}\right )} \cos \left (d x + c\right )^{2} - 60 \, {\left (a b \cos \left (d x + c\right )^{4} - 2 \, a b \cos \left (d x + c\right )^{2} + a b\right )} \log \left (\frac {1}{2} \, \sin \left (d x + c\right )\right ) \sin \left (d x + c\right ) + 16 \, a^{2} - 80 \, b^{2} + 15 \, {\left (4 \, a b \cos \left (d x + c\right )^{2} - 3 \, a b\right )} \sin \left (d x + c\right )}{30 \, {\left (d \cos \left (d x + c\right )^{4} - 2 \, d \cos \left (d x + c\right )^{2} + d\right )} \sin \left (d x + c\right )} \]

input
integrate(cos(d*x+c)^5*csc(d*x+c)^6*(a+b*sin(d*x+c))^2,x, algorithm="frica 
s")
 
output
-1/30*(30*b^2*cos(d*x + c)^6 + 30*(a^2 - 5*b^2)*cos(d*x + c)^4 - 40*(a^2 - 
 5*b^2)*cos(d*x + c)^2 - 60*(a*b*cos(d*x + c)^4 - 2*a*b*cos(d*x + c)^2 + a 
*b)*log(1/2*sin(d*x + c))*sin(d*x + c) + 16*a^2 - 80*b^2 + 15*(4*a*b*cos(d 
*x + c)^2 - 3*a*b)*sin(d*x + c))/((d*cos(d*x + c)^4 - 2*d*cos(d*x + c)^2 + 
 d)*sin(d*x + c))
 
3.13.22.6 Sympy [F(-1)]

Timed out. \[ \int \cot ^5(c+d x) \csc (c+d x) (a+b \sin (c+d x))^2 \, dx=\text {Timed out} \]

input
integrate(cos(d*x+c)**5*csc(d*x+c)**6*(a+b*sin(d*x+c))**2,x)
 
output
Timed out
 
3.13.22.7 Maxima [A] (verification not implemented)

Time = 0.19 (sec) , antiderivative size = 105, normalized size of antiderivative = 0.85 \[ \int \cot ^5(c+d x) \csc (c+d x) (a+b \sin (c+d x))^2 \, dx=\frac {60 \, a b \log \left (\sin \left (d x + c\right )\right ) + 30 \, b^{2} \sin \left (d x + c\right ) + \frac {60 \, a b \sin \left (d x + c\right )^{3} - 30 \, {\left (a^{2} - 2 \, b^{2}\right )} \sin \left (d x + c\right )^{4} - 15 \, a b \sin \left (d x + c\right ) + 10 \, {\left (2 \, a^{2} - b^{2}\right )} \sin \left (d x + c\right )^{2} - 6 \, a^{2}}{\sin \left (d x + c\right )^{5}}}{30 \, d} \]

input
integrate(cos(d*x+c)^5*csc(d*x+c)^6*(a+b*sin(d*x+c))^2,x, algorithm="maxim 
a")
 
output
1/30*(60*a*b*log(sin(d*x + c)) + 30*b^2*sin(d*x + c) + (60*a*b*sin(d*x + c 
)^3 - 30*(a^2 - 2*b^2)*sin(d*x + c)^4 - 15*a*b*sin(d*x + c) + 10*(2*a^2 - 
b^2)*sin(d*x + c)^2 - 6*a^2)/sin(d*x + c)^5)/d
 
3.13.22.8 Giac [A] (verification not implemented)

Time = 0.40 (sec) , antiderivative size = 131, normalized size of antiderivative = 1.06 \[ \int \cot ^5(c+d x) \csc (c+d x) (a+b \sin (c+d x))^2 \, dx=\frac {60 \, a b \log \left ({\left | \sin \left (d x + c\right ) \right |}\right ) + 30 \, b^{2} \sin \left (d x + c\right ) - \frac {137 \, a b \sin \left (d x + c\right )^{5} + 30 \, a^{2} \sin \left (d x + c\right )^{4} - 60 \, b^{2} \sin \left (d x + c\right )^{4} - 60 \, a b \sin \left (d x + c\right )^{3} - 20 \, a^{2} \sin \left (d x + c\right )^{2} + 10 \, b^{2} \sin \left (d x + c\right )^{2} + 15 \, a b \sin \left (d x + c\right ) + 6 \, a^{2}}{\sin \left (d x + c\right )^{5}}}{30 \, d} \]

input
integrate(cos(d*x+c)^5*csc(d*x+c)^6*(a+b*sin(d*x+c))^2,x, algorithm="giac" 
)
 
output
1/30*(60*a*b*log(abs(sin(d*x + c))) + 30*b^2*sin(d*x + c) - (137*a*b*sin(d 
*x + c)^5 + 30*a^2*sin(d*x + c)^4 - 60*b^2*sin(d*x + c)^4 - 60*a*b*sin(d*x 
 + c)^3 - 20*a^2*sin(d*x + c)^2 + 10*b^2*sin(d*x + c)^2 + 15*a*b*sin(d*x + 
 c) + 6*a^2)/sin(d*x + c)^5)/d
 
3.13.22.9 Mupad [B] (verification not implemented)

Time = 11.41 (sec) , antiderivative size = 297, normalized size of antiderivative = 2.40 \[ \int \cot ^5(c+d x) \csc (c+d x) (a+b \sin (c+d x))^2 \, dx=\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (\frac {5\,a^2}{96}-\frac {b^2}{24}\right )}{d}-\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (\frac {5\,a^2}{16}-\frac {7\,b^2}{8}\right )}{d}-\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\,\left (10\,a^2-92\,b^2\right )-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,\left (\frac {22\,a^2}{15}-\frac {4\,b^2}{3}\right )+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,\left (\frac {25\,a^2}{3}-\frac {80\,b^2}{3}\right )+\frac {a^2}{5}-11\,a\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3-12\,a\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+a\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left (32\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7+32\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5\right )}-\frac {a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{160\,d}+\frac {3\,a\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{8\,d}-\frac {a\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{32\,d}+\frac {2\,a\,b\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{d}-\frac {2\,a\,b\,\ln \left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}{d} \]

input
int((cos(c + d*x)^5*(a + b*sin(c + d*x))^2)/sin(c + d*x)^6,x)
 
output
(tan(c/2 + (d*x)/2)^3*((5*a^2)/96 - b^2/24))/d - (tan(c/2 + (d*x)/2)*((5*a 
^2)/16 - (7*b^2)/8))/d - (tan(c/2 + (d*x)/2)^6*(10*a^2 - 92*b^2) - tan(c/2 
 + (d*x)/2)^2*((22*a^2)/15 - (4*b^2)/3) + tan(c/2 + (d*x)/2)^4*((25*a^2)/3 
 - (80*b^2)/3) + a^2/5 - 11*a*b*tan(c/2 + (d*x)/2)^3 - 12*a*b*tan(c/2 + (d 
*x)/2)^5 + a*b*tan(c/2 + (d*x)/2))/(d*(32*tan(c/2 + (d*x)/2)^5 + 32*tan(c/ 
2 + (d*x)/2)^7)) - (a^2*tan(c/2 + (d*x)/2)^5)/(160*d) + (3*a*b*tan(c/2 + ( 
d*x)/2)^2)/(8*d) - (a*b*tan(c/2 + (d*x)/2)^4)/(32*d) + (2*a*b*log(tan(c/2 
+ (d*x)/2)))/d - (2*a*b*log(tan(c/2 + (d*x)/2)^2 + 1))/d